//SQL语句映射文件,提供API调用
//SQL语句
var sqlMap = {
	//用户
	user:{
		add:'insert into user(name,password,phone) values (?,?,?)',
		search_name:'select * from user where name = ?',
		// search_password:'select * from user where password = ?'
		search:'select * from user',
		// add_phone:'insert into user(phone) values (?)'
		update: 'update user set password = ? where phone = ?',
		search_phone:'select phone from user'
	},
	//book_information
	book_information:{
		search:'select * from book_information',
		search_type:'select distinct(b_title),b_author,b_type,b_id,b_num from book_information where b_type = ?'
	},
	//chapter
	chapter:{
		// search_all:'select * from chapter',
		search:'select * from chapter where chapter.c_novel_id = ?'
	},
	//chaptercontent
	chaptercontent:{
		search:'select * from chaptercontent where chaptercontent.t_title = ?'
	},
	mingzhubooksinfo:{
		select_title:'select title from mingzhubooksinfo',
		select:'select * from mingzhubooksinfo where title = ?',
		select_all:'select * from mingzhubooksinfo'
	},
	mingzhuchaptersinfo:{
		select_chapter:'select * from mingzhuchaptersinfo where bookname = ?',
	},
	mingzhucontentinfo:{
		select_chapter:'select * from mingzhucontentinfo where id = ?'
	}
}

module.exports = sqlMap;